Abstract out OTLP http exporter logic#5160
Abstract out OTLP http exporter logic#5160lorenzoronzani wants to merge 19 commits intoopen-telemetry:mainfrom
Conversation
|
/easycla |
2a75552 to
4405d3e
Compare
There was a problem hiding this comment.
I would recommend reconsidering your approach here. I'm generally not a huge fan of having functions with a huge number of arguments. I'd generally be more in favor of creating a common OTLPHttpClient, as is done in this PR
I was thinking the same but looking around I thought that the implemented method was the one expected. I can convert with a common client class. Thanks for the review |
|
I moved these 3 public constants: from each exporter (Log, Metric, Trace) into the common one but this Q: What is the right process in this cases? |
| break | ||
| return LogRecordExportResult.FAILURE | ||
| return ( | ||
| LogRecordExportResult.SUCCESS |
There was a problem hiding this comment.
can this Enum be part of _SignalConfig and returned directly from OTLPHttpClient
|
|
||
| ## Unreleased | ||
|
|
||
| - `opentelemetry-exporter-otlp-proto-http`: refactor shared HTTP exporter logic into common module, extract `_setup_session`, `_export`, |
There was a problem hiding this comment.
This description is sort of obsolete now
Description
This PR contains the refactoring required inside the
http_exporter_logiccomponent. The idea is to remove the duplicated code abstracting out inside a common sectionFixes #2990
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
uv run tox -e py312-test-opentelemetry-exporter-otlp-proto-httpDoes This PR Require a Contrib Repo Change?
Checklist: